Initiate credit card wallet payment in APP

Instead of redirecting your customers to the payment page in browser, you can load the payment page directly in the wallet provider app.

Integration

  • Setup callback_mobile_app_redirect config parameter

    This is the app url on the merchant's shop mobile application, where the customer will be redirected once the wallet transaction is finalized, when the transaction is done on a mobile device. This ensures that the customer does not have to switch to the browser, but rather remains in the mobile app's context, after the customer finalize the transaction.

    For more details about callback_mobile_app_redirect, please visit Payment Mobile App Redirect Page.

    Setup callback_mobile_app_redirect is optional. In case the callback_mobile_app_redirect is not set, finalize wallet payment will end up in browser and will use the callback_ok/callback_failed to show the final page.

  • Initiate credit card wallet payment in APP

    To initiate the credit card wallet payment in app, you should call the AppUrl returned from the createPaymentRequest method with some parameters.

    Example of App Url
    <?xml version="1.0"?>
    <APIResponse version="20170228">
        <Header>
            <Date>2023-01-01T00:00:00+00:00</Date>
            <Path>API/createPaymentRequest</Path>
            <ErrorCode>0</ErrorCode>
            <ErrorMessage/>
        </Header>
        <Body>
            <Result>Success</Result>
            <PaymentRequestId>xyz</PaymentRequestId>
            <Url>https://<YourShopName>.altapaysecure.com/eCommerce/API/requestForm?pid=xyz</Url>
            <DynamicJavascriptUrl>https://<YourShopName>.altapaysecure.com/eCommerce/API/embeddedPaymentWindow?pid=xyz</DynamicJavascriptUrl>
            <AppUrl>https://<YourShopName>.altapaysecure.com/eCommerce/API/creditCardWalletInitiateAppPayment/xyz</AppUrl>
        </Body>
    </APIResponse>
                                                            

    The following parameters have to be added to the request to AppUrl. They are required for 3DSecure V2 Authentication Assessment.

    Example of request
    curl --request GET \
      --url https://<YourShopName>.altapaysecure.com/merchant/API/creditCardWalletInitiateAppPayment/xyz \
      --header 'Content-Type: application/x-www-form-urlencoded' \
      --header 'Authorization: Basic auth' \
      --data 'customer_info[cardholder_name]=asdasd' \
      --data 'customer_info[client_accept_language]=en' \
      --data 'customer_info[client_user_agent]=Mozilla/5.0 (Linux; Android 13; SM-A536B)' \
      --data 'customer_info[client_ip]=172.0.0.1' \
      --data 'customer_info[client_accept]=text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' \
      --data 'customer_info[client_java_enabled]=false' \
      --data 'customer_info[client_color_depth]=24' \
      --data 'customer_info[client_screen_height]=845' \
      --data 'customer_info[client_screen_width]=384' \
      --data 'customer_info[client_time_zone]=-60' \
      --data 'customer_info[client_javascript_enabled]=true'
                                                            
  • Redirect to APP url

    The call to /eCommerce/API/creditCardWalletInitiateAppPayment will return an APP url to the payment on the CC wallet provider APP where you should redirect the customer from you mobile app.

    Example of response
    <?xml version="1.0"?>
    <APIResponse version="20170228">
        <Header>
            <Date>2023-01-09T12:36:18+00:00</Date>
            <Path>API/creditCardWalletInitiateAppPayment/202e3d20-eec0-45ce-84fa-8de5fba7e805</Path>
            <ErrorCode>0</ErrorCode>
            <ErrorMessage/>
        </Header>
        <Body>
            <Result>Redirect</Result>
            <RedirectResponse>
                <Url>mobilepayonline-test://online?paymentid=a8887637-4fca-40ba-8105-ae42c2a7b988</Url>
                <Method/>
                <Data/>
            </RedirectResponse>
        </Body>
    </APIResponse>
    
                                                            

Only MobilePay and Vipps are in scope for in-APP redirect

Known Limitation: MobilePay Subscriptions integration will NOT return an APP url on the /eCommerce/API/creditCardWalletInitiateAppPayment request, but the returned HTTPS url will redirect the customer to the MobilePay APP.